<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function cook()
        {
            this.age
            this.cooking=function(foodName)
            {
                console.log("出餐："+foodName);

            }
        }
        var c1 = new cook()
        c1.age =18
        c1.cooking("煎饼果子")
        var c2 = new cook()
        c2.age =30
        c2.cooking("掉渣饼")
    </script>
</body>
</html>